#!/bin/bash

# update_image.sh
# replaces the file called 'kernel' in a precompiled floppy disk image with the version of 'kernel' in the
# current directory.

sudo /sbin/losetup /dev/loop0 $3
sudo mount -o loop /dev/loop0 /mnt2
sudo rm /mnt2/kernel
sudo cp $1 /mnt2/kernel
sudo cp $2 /mnt2/initrd
sudo umount /dev/loop0
sudo /sbin/losetup -d /dev/loop0
